from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.action_chains import ActionChains
import time

driver = webdriver.Edge()
driver.get('https://www.kongfz.cn/')


# 登录 1
driver.find_element(By.XPATH,'//*[@id="nickName"]/span[1]')
time.sleep(5)
# xt = driver.find_element(By.XPATH,'//*[@id="nickName"]/span[1]')
# ActionChains(driver).move_to_element(xt).perform()
# time.sleep(2)
# 登录 2   item-info login-win
driver.find_element(By.CLASS_NAME,'login-btn').click()
time.sleep(5)
# 进入框架
driver.switch_to.frame(driver.find_element(By.ID,'iframe_login'))
time.sleep(3)

driver.find_element(By.CLASS_NAME,'qq.m_r27').click()
time.sleep(3)

# f = driver.find_element(By.NAME,'ptlogin_iframe')
# driver.switch_to.frame(f)
# time.sleep(2)
# driver.find_element(By.ID,'img_out_1056596697').click()
# time.sleep(2)
# driver.find_element(By.XPATH,'//*[@id="navHeader"]/div/div[3]/div[5]/a/span').click()
# time.sleep(5)
#
# driver.find_element(By.ID,'pic_upload').send_keys(r'')
# time.sleep(3)